//
//  ProductDetailInfoCell.m
//  KiklinkApp
//
//  Created by LJC on 14-9-30.
//  Copyright (c) 2014年 Kiklink. All rights reserved.
//

#import "ProductDetailInfoCell.h"
#import "UIColor+hex.h"

@implementation ProductDetailInfoCell

- (void)awakeFromNib
{
    self.seperateView.backgroundColor = [UIColor colorWithHexString:AppColor_BackGround];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)loadDataWithProduct:(Product *)product
{
    self.nameLabel.text = product.name;
    self.minuteLabel.text = [NSString stringWithFormat:@"%ld分钟",(long)product.perClassMinutes];
    switch (product.teachType) {
        case 1:
            self.teachTypeLabel.text = @"一对一";
            break;
        case 2:
            self.teachTypeLabel.text = @"多对一";
            break;
        case 3:
            self.teachTypeLabel.text = @"一对多";
            break;
        default:
            self.teachTypeLabel.text = @"其他";
            break;
    }
    self.validDayLabel.text = [NSString stringWithFormat:@"%ld",(long)product.validDays];
    switch (product.categoryid) {
        case 10:
            self.categoryLabel.text = @"球类";
            break;
        case 20:
            self.categoryLabel.text = @"健身瑜伽";
            break;
        case 30:
            self.categoryLabel.text = @"运动恢复";
            break;
        case 40:
            self.categoryLabel.text = @"水上冰上";
            break;
        case 50:
            self.categoryLabel.text = @"极限户外";
            break;
        case 60:
            self.categoryLabel.text = @"舞蹈";
            break;
        case 70:
            self.categoryLabel.text = @"射击搏击格斗";
            break;
        default:
            self.categoryLabel.text = @"其他";
            break;
    }
    self.placeLabel.text = product.ext1;
}

@end
